Skip to content

feat: add direct debit mandates client#11

Merged
GREENFONTS merged 2 commits into
mainfrom
dev
Jun 30, 2026
Merged

feat: add direct debit mandates client#11
GREENFONTS merged 2 commits into
mainfrom
dev

Conversation

@GREENFONTS

Copy link
Copy Markdown
Collaborator

What and why

Adds direct debit mandate support to IMonnifyCollectionsClient: CreateMandateAsync, GetMandatesAsync, DebitMandateAsync, GetMandateDebitStatusAsync, CancelMandateAsync, and ListMandatesAsync.

DebitMandateAsync/GetMandateDebitStatusAsync remain unverified end-to-end - that needs a mandate in ACTIVE status, which requires real customer bank-transfer authorization that can't be performed programmatically. Also added LenientStringJsonConverter: GetMandateDebitStatusAsync's responseMessage is documented as a string but our own sample shows it as {} on that specific endpoint - this reads either shape without throwing.

Also includes a small cleanup: dropped the now-redundant Cards entries from CHANGELOG.md's Unreleased section, since those shipped in v0.2.0 and are already covered by release-please's own [0.2.0] section.

Checklist

  • Tests added/updated and passing (dotnet test)
  • dotnet format --verify-no-changes passes
  • CHANGELOG.md updated under [Unreleased]
  • docs/COMPATIBILITY.md updated for any endpoint you implemented or changed
  • No secrets, tokens, or real API keys committed

IMonnifyCollectionsClient gains CreateMandateAsync, GetMandatesAsync,
DebitMandateAsync, GetMandateDebitStatusAsync, CancelMandateAsync, and
ListMandatesAsync. Sandbox-tested (create, retrieve, list, cancel)
against a real mandate, surfacing several real discrepancies with our
own docs: the reference field is mandateReference not
externalMandateReference, two undocumented fields (responseMessage,
schemeCode), an extra mandateStatus value (PENDING_AUTHORIZATION), and
a paging shape that omits first/numberOfElements/empty in practice.
DebitMandateAsync/GetMandateDebitStatusAsync remain unverified
end-to-end since that needs a real ACTIVE mandate, which requires
customer bank-transfer authorization we can't perform programmatically.

Added LenientStringJsonConverter: GetMandateDebitStatusAsync's
responseMessage is documented as a string but our own sample shows it
as {} on that specific endpoint - this reads either without throwing.
Those shipped in v0.2.0 (see release-please's own [0.2.0] section
above) - keeping them under Unreleased was stale/duplicated.
@GREENFONTS
GREENFONTS merged commit d8f772d into main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant